<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title><{:C('web_site_name')}>---用户添加</title>
<link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/common.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/main.css"/>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/lib.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/layer.min.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/fileuploader.js"></script>
</head>
<body>


<form  id="info_form" >
<input type="hidden" value="<?php echo isset($id)?$id:0 ;?>" name="info[uid]">
<div class="result-wrap">
            <div class="result-content">
                    <table class="insert-tab" width="100%">
                        <tbody>
                           
                            <tr>
                                <th>用户名：</th>
                                <td>
                               <?php echo $info['username'];?>
           
                                </td>
                            </tr>
                            <tr>
                                <th>密码：</th>
                                <td>
                                <input id="passwd" name="info[passwd]" type="text" value="" class="common-text required" />
           
                                </td>
                            </tr>
                            <tr>
                                <th>是否修改密码：</th>
                                <td>
                                <input  name="edit_pwd_ok" type="checkbox" value="1" class="common-text required" />
           
                                </td>
                            </tr>
                            <tr>
                                <th>昵称：</th>
                                <td>
                                <input id="uname" name="info[uname]" type="text" value="<?php echo $info['uname'];?>" class="common-text required" />
           
                                </td>
                            </tr>
                            <tr>
                                <th>性别：</th>
                                <td>
                                <select name="info[sex]" id="sex">
                                    <option value="all">请选择</option>
                                    <option value="1" <?php if($info['sex'] == 1 ){echo "selected";}?>>男</option>
                                    <option value="2" <?php if($info['sex'] == 2 ){echo "selected";}?>>女</option>
                                </select>
           
                                </td>
                            </tr>
                            <tr>
                                <th>过期时间：</th>
                                <td>
                                <input id="expire" name="info[expire]" type="text"  class="common-text required"   value="<?php if($info['expire']>0){echo date("Y-m-d H:i:s" , $info['expire']);}else{echo 0;}?>"  onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />如果为0,表示永不过期
           
                                </td>
                            </tr>
                            <tr>
                                <th>支付宝姓名：</th>
                                <td>
                                <input id="alipay_name" name="info[alipay_name]" type="text" value="<?php echo $info['alipay_name'];?>" class="common-text required" />
           
                                </td>
                            </tr>
                            <tr>
                                <th>支付宝帐号：</th>
                                <td>
                                <input id="alipay_account" name="info[alipay_account]" type="text" value="<?php echo $info['alipay_account'];?>" class="common-text required" />
           
                                </td>
                            </tr>
                   
                          
                
                        
                            <tr>
                                <th>状态：</th>
                                <td>
                                <input type="radio" name="info[status]" value="1" <?php if($info['status']==1){echo "checked";}?>/> 启用
                                 <input type="radio" name="info[status]" value="0" <?php if($info['status']==0){echo "checked";}?>/> 禁用
                                </td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" id="btn" value="提交" type="button">
                                </td>
                            </tr>
                        </tbody></table>
            </div>
        </div>
       
      </form>  
    
   </body>
   </html>    
 <script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/DatePicker/WdatePicker.js"></script>  
<script>
var loadding_0 ;
$(function(){
    $("#btn").bind("click" , function(){
        
        var data_ = $("#info_form").serializeArray() ;
        $.ajax({
            type: "POST",
            url: "<?php echo  U("member/edit" , array('action'=>'doedit' , 'inajax'=>1 ) ) ; ?>" ,
            data: data_,
            cache:false,
            dataType:"json",
            async:true,
            success: function(msg){
                var shtml = '' ;
                var list = msg.resultinfo.list;
                if(msg.resultcode != 1 ){
                    layer.msg(msg.resultinfo.errmsg);
                    return false ;
                }else{

                    parent.common_request();
                    parent.close_edit_div();
                }
                layer.close(loadding_0);
            },
            beforeSend:function(){
                 loadding_0 = layer.load('数据正在加载中。。。。。。'); 
            },
            error:function(){
                layer.msg('服务器繁忙请稍后');
                return false ;
            }
            });
        
    });
       
}) ; 
</script>
        
        